package cn.swust.designpatternlearningplatform.service.impl;

import cn.swust.designpatternlearningplatform.dao.TeacherDao;
import cn.swust.designpatternlearningplatform.domain.entity.Teacher;
import cn.swust.designpatternlearningplatform.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class TeacherServiceImpl implements TeacherService {
    @Autowired
    private TeacherDao teacherDao;
    @Override
    @Transactional
    public String getTeacherPassword(String number) {
        String teacherPassword=teacherDao.getTeacherPassword(number);
        return teacherPassword;
    }

    @Override
    public Teacher getTeacherByNumber(String number) {
        Teacher teacher=teacherDao.getTeacherByNumber(number);
        return teacher;
    }
}
